//****** 获取Todo数据
void ParseTodo(String content, struct News* data)
{
  DynamicJsonDocument json(8536); //分配内存,动态 1536
  DeserializationError error = deserializeJson(json, content); //解析json
  //serializeJson(json, Serial);//构造序列化json,将内容从串口输出
  if (error)   //检查API是否有返回错误信息，有返回则进入休眠
  {
    Serial.print("Todo加载json配置失败:");
    Serial.println(error.c_str());
    Serial.println(" ");
    String z = "Todo json配置失败:" + String(error.c_str()) + " " + content;
  }
  if (json["status_code"].isNull() == 0) //检查到不为空
  {
    strcpy(data->status_code, json["status_code"]);
    String z = "Todo List异常:" + String(xinwen.status_code);
    Serial.print("Todo List异常:"); Serial.println(xinwen.status_code);
  }
  else
  {
    if (json["data"].isNull() == 0){
      int n = 11;
      if(json["num"]<n)
        n=json["num"];
        
      for(int i = 0;i<11;i++){
        if(i<n){
          strcpy(data->title[i], json["data"][i]["title"]);
          Serial.println(json["data"][i]["title"].as<char*>()); 
        }else{
          json["data"][i]["title"]=" ";
          Serial.println("空条目"+String(i)); 
        }
      }
      Serial.println("Todo List获取完成，条数为："+String(n)); 

      
      } 
  }
}
